<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>title</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
</head>
<body>
<div class="layuimini-container" id="app">
    <div class="layuimini-main">
        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
            </div>
        </script>
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
        <script type="text/html" id="currentTableBar">
        </script>
    </div>
</div>
<script src="/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/js/common.js?v=5" charset="utf-8"></script>

<script>

    Id = urlParam('id')
    new Vue({
        el: "#app",
        data: {
            versionNow: '',
            hostVersion: '1',
            hostVersionAndriod: '2',
            hostVersionIos: '3',
            versionEventGlobalText: '',
            versionEventList: [],
        },
        created(){
            _this = this
        },
        methods: {
        },
        mounted() {
            var _this = this;
            layui.use(['form', 'table'], function () {
                $ = layui.jquery,
                    form = layui.form,
                    table = layui.table;
                table.render({
                    elem: '#currentTableId',
                    url: '/admin/fileInfo/paginate?gid=' + Id,
                    toolbar: '#toolbarDemo',
                    defaultToolbar: ['filter', 'print'],
                    cols: [[
                        {type: "checkbox", width: 50},
                        {field: 'id', width: 80, title: 'ID'},
                        {field: 'gname', title: '更新分组名称'},
                        {field: 'package_no', title: '包号'},
                        {field: 'filenameex', title: '上传文件名'},
                        {field: 'created_at', title: '上传时间'},
                    ]],
                    limits: [10, 15, 20, 25, 50, 100],
                    limit: 15,
                    page: true,
                    skin: 'line'
                });

                // 监听搜索操作
                form.on('submit(data-search-btn)', function (data) {

                    var searchData = data.field;
                    //执行搜索重载
                    table.reload('currentTableId', {
                        page: {
                            curr: 1
                        }
                        , where: searchData
                    }, 'data');
                    return false;
                });




            });
        }
    })
</script>
</body>
</html>